home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / cxref-1.001 / cxref-1~ / cxref / cpp / cccp.c.diff next >
Encoding:
Text File  |  1996-02-24  |  3.8 KB  |  113 lines

  1. ===================================================================
  2. RCS file: RCS/cccp.c
  3. retrieving revision 1.1
  4. diff -c -r1.1 cccp.c
  5. *** 1.1    1995/04/24 18:18:51
  6. --- cccp.c    1995/08/01 20:20:32
  7. ***************
  8. *** 3,8 ****
  9. --- 3,12 ----
  10.      Written by Paul Rubin, June 1986
  11.      Adapted to ANSI C, Richard Stallman, Jan 1987
  12.   
  13. +    Modified by Andrew M. Bishop to provide better input to
  14. +    C documentation program `cxref' April-August 1995.
  15. +    All AMB hacks are indicated as such in the code.
  16.   This program is free software; you can redistribute it and/or modify it
  17.   under the terms of the GNU General Public License as published by the
  18.   Free Software Foundation; either version 2, or (at your option) any
  19. ***************
  20. *** 930,936 ****
  21.   /* Here is the actual list of #-directives, most-often-used first.  */
  22.   
  23.   static struct directive directive_table[] = {
  24. !   {  6, do_define, "define", T_DEFINE, 0, 1},
  25.     {  2, do_if, "if", T_IF},
  26.     {  5, do_xifdef, "ifdef", T_IFDEF},
  27.     {  6, do_xifdef, "ifndef", T_IFNDEF},
  28. --- 934,940 ----
  29.   /* Here is the actual list of #-directives, most-often-used first.  */
  30.   
  31.   static struct directive directive_table[] = {
  32. !   {  6, do_define, "define", T_DEFINE, 0, 1, 1}, /* An AMB Hack , added ', 1' at end. */
  33.     {  2, do_if, "if", T_IF},
  34.     {  5, do_xifdef, "ifdef", T_IFDEF},
  35.     {  6, do_xifdef, "ifndef", T_IFNDEF},
  36. ***************
  37. *** 3457,3463 ****
  38.   
  39.     /* Nonzero means we must copy the entire command
  40.        to get rid of comments or backslash-newlines.  */
  41. !   int copy_command = 0;
  42.   
  43.     U_CHAR *ident, *after_ident;
  44.   
  45. --- 3461,3467 ----
  46.   
  47.     /* Nonzero means we must copy the entire command
  48.        to get rid of comments or backslash-newlines.  */
  49. !   int copy_command = 1; /* An AMB Hack , original was 0. */
  50.   
  51.     U_CHAR *ident, *after_ident;
  52.   
  53. ***************
  54. *** 3634,3640 ****
  55.           /* No need to copy the command because of a comment at the end;
  56.              just don't include the comment in the directive.  */
  57.           if (bp == limit || *bp == '\n') {
  58. !           bp = obp;
  59.             goto endloop1;
  60.           }
  61.           /* Don't remove the comments if -traditional.  */
  62. --- 3638,3644 ----
  63.           /* No need to copy the command because of a comment at the end;
  64.              just don't include the comment in the directive.  */
  65.           if (bp == limit || *bp == '\n') {
  66. !           /* bp = obp; An AMB Hack, originalwas not commented out. */
  67.             goto endloop1;
  68.           }
  69.           /* Don't remove the comments if -traditional.  */
  70. ***************
  71. *** 4443,4449 ****
  72.         pcfinclude (pcfbuf, pcfbuflimit, fname, op);
  73.       }
  74.       else
  75. !       finclude (f, fname, op, is_system_include (fname), searchptr);
  76.   
  77.       if (angle_brackets)
  78.         system_include_depth--;
  79. --- 4447,4453 ----
  80.         pcfinclude (pcfbuf, pcfbuflimit, fname, op);
  81.       }
  82.       else
  83. !       finclude (f, fname, op, angle_brackets , searchptr); /* An AMB  Hack, orignal had is_system_include(fname) instead of angle_brackets. */
  84.   
  85.       if (angle_brackets)
  86.         system_include_depth--;
  87. ***************
  88. *** 7667,7674 ****
  89.   #else
  90.     sprintf (line_cmd_buf, "# %d ", ip->lineno);
  91.   #endif
  92. !   line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf),
  93. !                ip->nominal_fname);
  94.     if (file_change != same_file) {
  95.       *line_end++ = ' ';
  96.       *line_end++ = file_change == enter_file ? '1' : '2';
  97. --- 7671,7684 ----
  98.   #else
  99.     sprintf (line_cmd_buf, "# %d ", ip->lineno);
  100.   #endif
  101. ! /* An AMB Hack START, all new code. */
  102. !   if(ip->dir && ip->dir->fname)
  103. !      line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf),
  104. !                               &ip->nominal_fname[strlen(ip->dir->fname)+1]);
  105. !   else
  106. ! /* An AMB Hack END */
  107. !      line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf),
  108. !                               ip->nominal_fname);
  109.     if (file_change != same_file) {
  110.       *line_end++ = ' ';
  111.       *line_end++ = file_change == enter_file ? '1' : '2';
  112.